home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
G-Games
/
(c)g7.d64
/
cards utility
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
3KB
|
72 lines
1 REM CARD PRINTING UTILITY
2 REM DAVID A. HOOK, 58 STEEL STREET
3 REM BARRIE, ONTARIO, L4M 2E9
4 REM SEE TRANSACTOR VOL II, #11
10 DATAA,2,3,4,5,6,7,8,9,10,J,Q,K
20 DATA,,,1,,,,1,,,,,,1,1,,,1,,,1,2,,,,,,2,2,,,1,,,2
30 DATA2,,,2,,,2,2,,1,,2,,2,2,,2,,2,,2,2,,2,1,2,,2,2,1,2,,2,1,2
40 DATA"[223][146] [169] "," [146][188][167][186] "," [161][146][169][169][146][223] "
50 DATA" [166][169][214][146][169][166] "," [223][146][169][169][146][161] "
60 DATA" [167][208] [146][187] "," [146][169] [223]","[169][208] "," [146][169][194][170] "," [146] [187] "," [166][214][214][214][166] "
70 DATA" [188][146] "," [180][221][169] "," [204][146][169]","[223][146] [169] "," [167] [166][194] "," [146][169] [188] "
80 DATA" [166][191][191][191][166] "," [146][187] [169] "," [221][166] [165] "," [146][169] [223]"
90 GOSUB40000
100 PRINT"[147]"TAB(10)"CARD UTILITY":PRINT"1. DISPLAY CARDS":PRINT"2. SHUFFLE
110 [153]"3. SUBROUTINE FOR GAMES":[153]"4. QUIT":[153]"SELECTION ?";
120 [161]Z$:[139]Z$[178]""[167]120
130 Z[178][197](Z$):[153]Z:[139]Z[179]1[176]Z[177]4[167]100
140 [139]Z[178]4[167][128]
150 [145]Z[141]42000,41000,43000:[153]"DONE--HIT A KEY
160 GETZ$:IFZ$=""THEN160
170 GOTO100
14998 END
14999 REM INPUT SBR
15000 INPUT" [166][157][157][157]";Z$:IFZ$="[166]"THEN15000
15010 Z=VAL(Z$):RETURN
39999 REM INITIALIZATION
40000 I=RND(-TI*1E9):J=0:D%=0:J%=0:K%=0
40010 INPUT"NUMBER OF DECKS 1[157][157][157]";D%
40020 DIMD%(D%*52):FORI=1TOD%:FORJ=0TO51:D%(52*(I-1)+J)=J:NEXTJ,I:D%=D%*52-1
40030 DIMI$(13):FORI=1TO13:READI$(I):NEXTI
40040 S1$=" [216] [218] [211] [193] ":S2$=" [216] [216] [218] [218] [211] [211] [193] [193] "
40050 DIMS$(2,3):FORI=0TO3:S$(0,I)=" ":S$(1,I)=MID$(S1$,I*4+1,7)
40060 S$(2,I)=MID$(S2$,I*6+1,7):NEXTI
40070 DIMS%(10,7):FORI=1TO10:FORJ=1TO7:READS%(I,J):NEXTJ,I
40080 DIMF$(3,7):FORI=1TO3:FORJ=1TO7:READF$(I,J):NEXTJ,I
40090 RETURN
40999 REM SHUFFLE
41000 FORI=0TOD%:J%=(D%+1-I)*RND(1):K%=D%(J%)
41010 D%(J%)=D%(D%-I):D%(D%-I)=K%:NEXTI:RETURN
41999 REM DISPLAY ALL CARDS
42000 PRINT"[147]":C%=0:FORL=0TOD%:C%=C%+1:
42010 S%=D%(C%-1)/13:V%=D%(C%-1)-13*S%+1
42020 L%=7:A%=5:TB%=0
42030 IFL/A%=INT(L/A%)THENT%=TB%:PRINTLEFT$("[147]",L%):GOTO42050
42040 T%=T%+8:PRINT"[145][145][145][145][145][145][145][145][145]";
42050 PRINTTAB(T%)""LEFT$(I$(V%)+" ",7):FORJ=1TO7
42060 IFV%>10THEN42500
42070 PRINTTAB(T%)""S$(S%(V%,J),S%):GOTO42750
42500 IFJ=1THENPRINTTAB(T%)" "MID$("[216][218][211][193]",S%+1,1)F$(V%-10,J):GOTO42750
42510 IFJ=7THENPRINTTAB(T%)""F$(V%-10,J)""MID$("[216][218][211][193]",S%+1,1)" ":GOTO42750
42520 PRINTTAB(T%)""F$(V%-10,J)
42750 NEXTJ:PRINTTAB(T%)""RIGHT$(" "+I$(V%),7)
42800 NEXTL:RETURN
42999 REM GAME-TYPE SUBROUTINE
43000 PRINT"[147]HOW MANY CARDS TO PRINT";:GOSUB15000:P%=Z
43010 PRINT"START ON LINE (1-16)";:GOSUB15000:L%=Z
43020 PRINT"HOW MANY ACROSS (1-5)";:GOSUB15000:A%=Z
43030 PRINT"START AT TAB (0-32)";:GOSUB15000:TB%=Z
43040 M%=D%+1:PRINT"SHUFFLE AFTER (1-"M%")";:GOSUB15000:M%=Z
43100 PRINT"[147]":C%=0:FORL=0TOP%-1:C%=C%+1:IFC%=M%+1THENC%=1:GOSUB41000
43130 S%=D%(C%-1)/13:V%=D%(C%-1)-13*S%+1
43140 IFL/A%=INT(L/A%)THENT%=TB%:PRINTLEFT$("[147]",L%):GOTO43160
43150 T%=T%+8:PRINT"[145][145][145][145][145][145][145][145][145]";
43160 PRINTTAB(T%)""LEFT$(I$(V%)+" ",7):FORJ=1TO7
43170 IFV%>10THEN43500
43250 PRINTTAB(T%)""S$(S%(V%,J),S%):GOTO43750
43500 IFJ=1THENPRINTTAB(T%)" "MID$("[216][218][211][193]",S%+1,1)F$(V%-10,J):GOTO43750
43510 IFJ=7THENPRINTTAB(T%)""F$(V%-10,J)""MID$("[216][218][211][193]",S%+1,1)" ":GOTO43750
43520 PRINTTAB(T%)""F$(V%-10,J)
43750 NEXTJ:PRINTTAB(T%)""RIGHT$(" "+I$(V%),7)
43800 NEXTL:RETURN